package com.nega.modules.controller;

import com.nega.commons.model.MemberUser;
import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author: Garcia
 * @CreateDate: 2019/5/9 0:24
 * @Description: what it is class?
 */

@Controller
@RequestMapping("/")
public class IndexController {

    @RequestMapping("scan")
    public String index(Model model){
        MemberUser memberUser = (MemberUser) SecurityUtils.getSubject().getPrincipal();
        model.addAttribute("user",memberUser);
        return "view/index";
    }
}
